﻿
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>支付方式</title>
    <meta name="viewport" content="initial-scale=1, maximum-scale=1">
    <link rel="shortcut icon" href="/favicon.ico">
    <meta name="format-detection" content="telephone=no" />
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">

    <link rel="stylesheet" href="css/animation.css">
    <link rel="stylesheet" href="css/light7.min.css">
    <link rel="stylesheet" href="css/light7-swipeout.css">
    <link rel="stylesheet" href="css/light7-swiper.min.css">

    <link rel="stylesheet" href="css/wap_style.css">

</head>
<body>
<div class="page" id="receipt_list">
    <header class="bar bar-nav l-white">
        <a class="external icon pull-left return-icon back" href="{:url('deal_way')}">
            <img src="picture/return_gray.png" width="100%">
        </a>
        <h1 class="title"><span>支付方式</span></h1>
        <a class="external button button-link button-nav pull-right" style="color: #f6383a;" href="{:url('add_term')}">
            新增
            <span class="icon icon-right" style="font-size: .75rem"></span>
        </a>
    </header>
    <style>.list-item .swipeout-content {
        padding: 0 .5rem
    }

    #receipt_list .list-block {
        font-size: .65rem
    }</style>
    <div class="content infinite-scroll transfer-content">
        <div class="list-block" style="min-height: 100%">
            <ul class="section" style="background-color: #fff">
                {volist name='data' id='order'}
                <li class="swipeout list-item bottom-line" data-id="{$order.id}">
                    <div class="swipeout-content hanging">
                        <div class="hanging-body">{$order.types} {$order.name} {$order.account} {$order.bank} {$order.branch} </div>
                        <label class="label-switch small" style="margin-left: .5rem">
                            <input type="checkbox" data-id="{$order.id}" {$order.state == 1?'checked':''} class="receipt_check">
                            <div class="checkbox"></div>
                        </label>
                    </div>
                    <div class="swipeout-actions-right">
                        <a class="external bg-danger swipeout-delete" href="#" data-confirm="您确认删除该收款方式？">删除</a>
                    </div>
                </li>
                {/volist}
            </ul>
            <div class="infinite-scroll-preloader"></div>

        </div>
    </div>    
</div>
<script type="text/javascript">
    var base_url = 'http://www.jiaoyi.com/';
</script>
<script type='text/javascript' src='js/jquery-3.3.1.min.js' charset='utf-8'></script>
<script type='text/javascript' src='js/light7.min.js' charset='utf-8'></script>
<script type='text/javascript' src='js/light7-swiper.min.js' charset='utf-8'></script>
<script type='text/javascript' src='js/light7-swipeout.js' charset='utf-8'></script>
<script type='text/javascript' src='js/cn.min.js' charset='utf-8'></script>
<script type='text/javascript' src='js/layui.js' charset='utf-8'></script>
<script type='text/javascript' src='js/basis.js' charset='utf-8'></script>
</body>
<script type="text/javascript">
        $('#receipt_list').off('delete', '.swipeout').on('delete', '.swipeout', function (e, d) {
            var id = $(this).data('id');
            $.ajax({
                type:'post',
                url : "{:url('term_del')}",
                data:{id:id},
                cache:false,
                dataType:'JSON',
                success:function(data){
                },
                error:function(e){
                },
                beforeSend:function(e){
                    
                }
            });
        }).off('change', '.receipt_check').on('change', '.receipt_check', function () {
            var id = $(this).data('id'),ischecked = $(this).prop("checked");
            console.log(ischecked)
            $.ajax({
                type:'post',
                url : "{:url('term_up')}",
                data:{id:id,ischecked:ischecked?1:-1},
                cache:false,
                dataType:'JSON',
                success:function(data){
                },
                error:function(e){
                },
                beforeSend:function(e){
                    
                }
            });
        });

    </script>
</html>
